﻿using System;
using System.ComponentModel.DataAnnotations;
using EasyMvc.Utility;
using System.Collections.Generic;

namespace EasyMvc.Models
{
    [Table("Document")]
    public partial class Document
    {
        public int Id { get; set; }
        [StringLength(200)]
        [Required]
        public string Name { get; set; }
        public DateTime? AddTime { get; set; }
        public int Hits { get; set; }
        public int Diggs { get; set; }
        public int Favs { get; set; }
        [StringLength(200)]
        public string Url { get; set; }
        [StringLength(200)]
        public string XpsUrl { get; set; }
        [StringLength(200)]
        public string ThumbUrl { get; set; }

        [StringLength(400)]
        public string Tags { get; set; }

        public bool EnableDownload { get; set; }
        public bool EnablePrint { get; set; }
        public bool EnableCopy { get; set; }

        [StringLength(100)]
        public string Username { get; set; }

        [StringLength(4000)]
        public string Pictures { get; set; }

        [StringLength(4000)]
        public string Content { get; set; }

        public int CategoryId { get; set; }
        public virtual Category Category { get; set; }

        public virtual ICollection<DocumentPost> DocumentPosts { get; set; }
    }

    public enum EnumPictureCategory
    {
        [EnumTitle("最新图片")]
        LastestPicture = 1,

        [EnumTitle("最热图片")]
        HotPicture = 2
    }
}
